package fun.chutianshu.competitionmanagement.controller;

import fun.chutianshu.competitionmanagement.pojo.Student;
import fun.chutianshu.competitionmanagement.service.StudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;


@RestController
@RequestMapping("/api/student")
public class StudentController {
    @Autowired
    StudentService studentService;


    @GetMapping("/getall")
    public List<Student> getAll(){
        System.out.println("getAllStudent.....");
        return studentService.getAllStudents();
    }
}
